<?php
/**
 * Created by PhpStorm.
 * User: zhangyi
 * Date: 17/3/11
 * Time: 上午10:45
 */
namespace backend\controllers;

use app\models\Exclusive;
use Yii;

class SchoolController extends BaseInterfaceController
{
    public function actionContent()
    {
        $type = $this->originData['type'];
        $model = Exclusive::find()->where(['type'=>$type])->orderBy('id desc')->one();
        if($model) {
            $this->content = array(
                'detail'=>$this->safe($model->content),
            );
        } else {
            $this->status=-1;
            $this->message='没有找到相关信息';
        }
        return $this->outputJson();

    }
}